package com.ds.components.builders;

import com.ds.components.bars.ElbowBar;

import java.awt.*;

public class ElbowBarBuilder extends ComponentBuilder<ElbowBar> 
{
	private int barLayout = ElbowBar.TOP;
	private int connectorPosition = ElbowBar.LEFT_CONNECTOR;
	private int borderSize = 5;
	private int connectorSize = 10;
	private int leftSpace = 150;
	private int rightSpace = 100;

	/* (non-Javadoc)
	 * @see com.ds.components.builders.AbstractBuilder#build()
	 */
	@Override
	public ElbowBar build() 
	{
		ElbowBar bar = new ElbowBar();
		
		bar.setBarLayout( this.barLayout );
		bar.setConnectorPosition( this.connectorPosition );
		bar.setBorderSize( this.borderSize );
		bar.setConnectorSize( this.connectorSize );
		bar.setLeftSpace( this.leftSpace );
		bar.setRightSpace( this.rightSpace );
//			todo		bar.setBackgroundRenderer( this.backgroundRenderer );
		bar.setPreferredSize( new Dimension( 225, 50 ) );
		bar.setBackground( Color.black );
		bar.setOpaque( true );
		bar.setForeground( Color.black );
		bar.setFont( new Font( "Arial Black", Font.PLAIN, 14 ) );

		return bar;
	}

	/**
	 * @return the barLayout
	 */
	public int getBarLayout() {
		return barLayout;
	}

	/**
	 * @param barLayout the barLayout to set
	 */
	public void setBarLayout(int barLayout) {
		this.barLayout = barLayout;
	}

	/**
	 * @return the borderSize
	 */
	public int getBorderSize() {
		return borderSize;
	}

	/**
	 * @param borderSize the borderSize to set
	 */
	public void setBorderSize(int borderSize) {
		this.borderSize = borderSize;
	}

	/**
	 * @return the connectorPosition
	 */
	public int getConnectorPosition() {
		return connectorPosition;
	}

	/**
	 * @param connectorPosition the connectorPosition to set
	 */
	public void setConnectorPosition(int connectorPosition) {
		this.connectorPosition = connectorPosition;
	}

	/**
	 * @return the connectorSize
	 */
	public int getConnectorSize() {
		return connectorSize;
	}

	/**
	 * @param connectorSize the connectorSize to set
	 */
	public void setConnectorSize(int connectorSize) {
		this.connectorSize = connectorSize;
	}

	/**
	 * @return the leftSpace
	 */
	public int getLeftSpace() {
		return leftSpace;
	}

	/**
	 * @param leftSpace the leftSpace to set
	 */
	public void setLeftSpace(int leftSpace) {
		this.leftSpace = leftSpace;
	}

	/**
	 * @return the rightSpace
	 */
	public int getRightSpace() {
		return rightSpace;
	}

	/**
	 * @param rightSpace the rightSpace to set
	 */
	public void setRightSpace(int rightSpace) {
		this.rightSpace = rightSpace;
	}
}
